]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Accept dropping any kind of icon over it
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Tue, 26 May 2020 14:19:39 +0000 (11:19 -0300)
committerFlorian Müllner <florian.muellner@gmail.com>
Mon, 20 Jul 2020 16:13:19 +0000 (16:13 +0000)
The grid will be able to handle them. As of now, it doesn't
do anything with folder icons, or icons in folders.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284

js/ui/appDisplay.js

index cbc098082431aa49912b178442d9dbc336556b4c..4d2bd7879adeb73af5c7fd45201c3a9ef7ff49a2 100644 (file)
@@ -912,14 +912,8 @@ class AppDisplay extends BaseAppView {
     }
 
     _canAccept(source) {
-        if (!(source instanceof AppIcon))
-            return false;
-
-        let view = _getViewFromIcon(source);
-        if (!(view instanceof FolderView))
-            return false;
-
-        return true;
+        return (source instanceof AppIcon) ||
+            (source instanceof FolderIcon);
     }
 
     handleDragOver(source) {
@@ -934,7 +928,8 @@ class AppDisplay extends BaseAppView {
             return false;
 
         let view = _getViewFromIcon(source);
-        view.removeApp(source.app);
+        if (view instanceof FolderView)
+            view.removeApp(source.app);
 
         if (this._currentDialog)
             this._currentDialog.popdown();